home *** CD-ROM | disk | FTP | other *** search
/ Shareware Grab Bag / Shareware Grab Bag.iso / 014 / truncate.arc / TRUNCATE.DOC next >
Encoding:
Text File  |  1985-10-23  |  1.1 KB  |  44 lines

  1.  
  2. /*  TRUNCATE.C
  3.  
  4.     Copyright (c) 1984, Gordon Lee Waite
  5.                 413 W. Pleasant Street
  6.                 Maquoketa, IA  52060
  7.  
  8.     summary:   truncate infile outfile length
  9.  
  10.     arguments: length is the position at which the program will
  11.            truncate each line in the input file.
  12.  
  13.            infile is the name of the input file.
  14.  
  15.            outfile is the name of the output file.
  16.  
  17.     options:   none
  18.  
  19.     description:
  20.  
  21.     Truncate is used to truncate the lines in a file.  Each line
  22.     is read from the input file, and if it is longer than the
  23.     specified length, it is truncated to the newly specified
  24.     length.  The length is figured before any newline or CR-LF pair
  25.     is added.  This program will put a newline at the end of
  26.     each line.
  27.  
  28.     Example:   truncate myfile yourfile 40
  29.  
  30.     The above command line will read the file "myfile", and
  31.     truncate each of its lines to 40 characters.  The resulting
  32.     file will be called "yourfile." 
  33.  
  34.     Note:  If a line is shorter than the specified length, it will
  35.     not be changed by TRUNCATE.
  36.  
  37. */
  38. 
  39.  
  40. ed "yourfile." 
  41.  
  42.     Note:  If a line is shorter than the specified length, it will
  43.     not be changed by TRUNCATE.
  44.